<?php

include_once "xAP-functions/webincludes.php";
$id=intval($_GET["id"]);
$url="http://www.bbc.co.uk/cgi-perl/weather/search/new_search.pl";
echo webpageheader();

$sql="select * from xAP_News_Source where SourceID=".$id;
$results=dbquery($sql);
$row=$results[0];

if (intval($row["CollectionInterval"])==0){
	$row["CollectionInterval"]=30;
}
//display
?>

<form name='settings' method='POST' action='config_setup_update.php'>
<input type='hidden' name='id' value='<?=$id?>'>
<table >
<TR><TD class='boldtext'>Alias</td><TD class='boldtext' colspan=3><input name='Alias' size=40 value="<?=$row["Alias"]?>"></td></tr>
<TR><TD class='boldtext'>URL</td><TD class='boldtext' colspan=3><input name='URL' size=60 value="<?=$row["URL"]?>"></td></tr>
<TR><TD class='boldtext'>Category</td><TD class='boldtext' colspan=3><input name='Category' size=30 value="<?=$row["Category"]?>"></td></tr>
<TR><TD class='boldtext'>Collection</td><TD class='boldtext' colspan=3><select name='CollectionInterval'><Option><?=$row["CollectionInterval"]?>
<option>5<option>10<option>15<option>20<option>30<option>45<option>100<option>120<option>180</td></tr>
<?php if($id!=0): ?>
<TR><TD class='boldtext'>Delete</td><TD class='boldtext' colspan=3><input type='checkbox' name='delete' value='1'></td></tr>
<?php endif;?>
<TR><TD class='boldtext'></td><TD class='boldtext' colspan=3><input type='submit' value='Update'></td></tr>
</table>

</form>

<?php
echo webpagefooter();
?>